﻿namespace EasyWeb
{
    using System;
    using System.Collections.Generic;
    using System.Globalization;
    using System.Linq;
    using System.Text;
    using System.Threading.Tasks;

    internal static class EWStringExtensions
    {
        public static string ToViewComponentId(this string id)
        {
            EWGuard.IsNotNullOrEmpty(id, "id");
            return string.Format(CultureInfo.InvariantCulture, "easyweb-{0}", id);
        }

        public static string ToViewComponentContainerId(this string id)
        {
            EWGuard.IsNotNullOrEmpty(id, "id");
            return string.Format(CultureInfo.InvariantCulture, "easyweb-container-{0}", id);
        }

        public static string ToViewComponentDataId(this string id)
        {
            EWGuard.IsNotNullOrEmpty(id, "id");
            return string.Format(CultureInfo.InvariantCulture, "easyweb-data-{0}", id);
        }
    }
}
